package com.snaildesign.lrc.bmo.impl;

import java.util.List;

import org.apache.log4j.Logger;

import com.snaildesign.common.BaseException;
import com.snaildesign.common.DAOException;
import com.snaildesign.common.DbException;
import com.snaildesign.countdown.dao.UtilityDAO;
import com.snaildesign.lrc.bmo.LrcManager;
import com.snaildesign.lrc.dao.LrcDAO;
import com.snaildesign.lrc.dao.impl.LrcDAOImpl;
import com.snaildesign.samples.model.Sample;

public class LrcManagerImpl implements LrcManager {
	private static Logger logger = Logger.getLogger(LrcManagerImpl.class.getName());
	
	private UtilityDAO utilityDAO;
	private LrcDAO lrcDAO;
	
	public LrcManagerImpl(){
		lrcDAO = new LrcDAOImpl();
	}
	
	public UtilityDAO getUtilityDAO() {
		return utilityDAO;
	}
	public void setUtilityDAO(UtilityDAO utilityDAO) {
		this.utilityDAO = utilityDAO;
	}
	public LrcDAO getLrcDAO() {
		return lrcDAO;
	}
	public void setLrcDAO(LrcDAO lrcDAO) {
		this.lrcDAO = lrcDAO;
	}

	public List<Sample> findLrcByLrcId(String lrcId) throws BaseException {
		try {
			return lrcDAO.findLrcByLrcId(lrcId);
		} catch (DAOException e) {
			throw new DbException(BaseException.SUBSYSTEM_LRC,
                    BaseException.SIDE_BACKGROUND,
                    e);
		}
	}
	

}
